﻿<?xml version="1.0" encoding="utf-8"?><ManagementPack ContentReadable="true" SchemaVersion="2.0" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <Manifest>
    <Identity>
      <ID>SSIS.AddIn</ID>
      <Version>1.0.0.0</Version>
    </Identity>
    <Name>SSIS Add-In</Name>
    <References>
      <Reference Alias="SCDW">
        <ID>Microsoft.SystemCenter.DataWarehouse.Library</ID>
        <Version>7.1.10226.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="MicrosoftSystemCenterServiceDesignerLibrary7084330">
        <ID>Microsoft.SystemCenter.ServiceDesigner.Library</ID>
        <Version>7.0.8433.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="MicrosoftWindowsLibrary7585010">
        <ID>Microsoft.Windows.Library</ID>
        <Version>7.5.8501.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="MicrosoftSystemCenterSyntheticTransactionsLibrary">
        <ID>Microsoft.SystemCenter.SyntheticTransactions.Library</ID>
        <Version>7.1.10226.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Performance">
        <ID>System.Performance.Library</ID>
        <Version>7.0.8433.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Image">
        <ID>System.Image.Library</ID>
        <Version>7.5.8501.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="MicrosoftSystemCenterInstanceGroupLibrary7585010">
        <ID>Microsoft.SystemCenter.InstanceGroup.Library</ID>
        <Version>7.5.8501.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="MicrosoftSQLServerLibrary6410">
        <ID>Microsoft.SQLServer.Library</ID>
        <Version>6.5.1.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="SQLServer2012Discovery6410">
        <ID>Microsoft.SQLServer.2012.Discovery</ID>
        <Version>6.5.1.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="System">
        <ID>System.Library</ID>
        <Version>7.5.8501.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="SystemCenter">
        <ID>Microsoft.SystemCenter.Library</ID>
        <Version>7.0.8433.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Health">
        <ID>System.Health.Library</ID>
        <Version>7.0.8433.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
    </References>
  </Manifest>
  <TypeDefinitions>
    <EntityTypes>
      <ClassTypes>
        <ClassType ID="SSIS.Packages" Accessibility="Public" Abstract="false" Base="MicrosoftWindowsLibrary7585010!Microsoft.Windows.ApplicationComponent" Hosted="true" Singleton="false" Extension="false">
          <Property ID="ID" Type="string" AutoIncrement="false" Key="true" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" Scale="0" />
          <Property ID="SSISServer" Type="string" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" Scale="0" />
          <Property ID="SQLInstance" Type="string" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" Scale="0" />
          <Property ID="Name" Type="string" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" Scale="0" />
          <Property ID="Version" Type="string" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="512" MinLength="0" Required="false" Scale="0" />
          <Property ID="Project" Type="string" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" Scale="0" />
          <Property ID="PackageGUID" Type="string" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="512" MinLength="0" Required="false" Scale="0" />
          <Property ID="ProjectLSN" Type="string" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" Scale="0" />
        </ClassType>
      </ClassTypes>
      <RelationshipTypes>
        <RelationshipType ID="SSIS.SQLHostsPackages" Accessibility="Public" Abstract="false" Base="System!System.Hosting">
          <Source ID="Source" MinCardinality="0" MaxCardinality="2147483647" Type="SQLServer2012Discovery6410!Microsoft.SQLServer.2012.DBEngine" />
          <Target ID="Target" MinCardinality="0" MaxCardinality="2147483647" Type="SSIS.Packages" />
        </RelationshipType>
      </RelationshipTypes>
    </EntityTypes>
    <ModuleTypes>
      <DataSourceModuleType ID="SSIS.TimedContentProbe" Accessibility="Internal" Batching="false">
        <Configuration>
          <xsd:element name="IntervalSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="SyncTime" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="ConnectionString" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="Query" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="OneRowPerItem" type="xsd:boolean" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
        </Configuration>
        <ModuleImplementation Isolation="Any">
          <Composite>
            <MemberModules>
              <DataSource ID="Scheduler" TypeID="System!System.Discovery.Scheduler">
                <Scheduler>
                  <SimpleReccuringSchedule>
                    <Interval Unit="Seconds">$Config/IntervalSeconds$</Interval>
                  </SimpleReccuringSchedule>
                  <ExcludeDates />
                </Scheduler>
              </DataSource>
              <ProbeAction ID="SQLProbe" TypeID="System!System.OleDbProbe">
                <ConnectionString>$Config/ConnectionString$</ConnectionString>
                <Query>$Config/Query$</Query>
                <GetValue>true</GetValue>
                <OneRowPerItem>true</OneRowPerItem>
                <GetFetchTime>false</GetFetchTime>
              </ProbeAction>
            </MemberModules>
            <Composition>
              <Node ID="SQLProbe">
                <Node ID="Scheduler" />
              </Node>
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.OleDbData</OutputType>
      </DataSourceModuleType>
      <DataSourceModuleType ID="SSIS.Discovery.TimedDiscoveryProbe" Accessibility="Internal" Batching="false">
        <Configuration>
          <IncludeSchemaTypes>
            <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
            <SchemaType>System!System.Discovery.MapperSchema</SchemaType>
          </IncludeSchemaTypes>
          <xsd:element name="IntervalSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="SyncTime" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="ConnectionString" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="Query" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="QueryTimeout" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="ClassId" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="InstanceSettings" type="SettingsType" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="Expression" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
        </Configuration>
        <ModuleImplementation Isolation="Any">
          <Composite>
            <MemberModules>
              <DataSource ID="DBProbe" TypeID="SSIS.TimedContentProbe">
                <IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
                <SyncTime>$Config/SyncTime$</SyncTime>
                <ConnectionString>$Config/ConnectionString$</ConnectionString>
                <Query>$Config/Query$</Query>
                <OneRowPerItem>true</OneRowPerItem>
              </DataSource>
              <ConditionDetection ID="Mapper" TypeID="System!System.Discovery.FilteredClassSnapshotDataMapper">
                <Expression>$Config/Expression$</Expression>
                <ClassId>$Config/ClassId$</ClassId>
                <InstanceSettings>$Config/InstanceSettings$</InstanceSettings>
              </ConditionDetection>
            </MemberModules>
            <Composition>
              <Node ID="Mapper">
                <Node ID="DBProbe" />
              </Node>
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.Discovery.Data</OutputType>
      </DataSourceModuleType>
      <DataSourceModuleType ID="SSIS.Database.TimedMonitorProbe" Accessibility="Internal" Batching="false">
        <Configuration>
          <xsd:element name="IntervalSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="SyncTime" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="ConnectionString" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="Query" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element name="OneRowPerItem" type="xsd:boolean" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
        </Configuration>
        <ModuleImplementation Isolation="Any">
          <Composite>
            <MemberModules>
              <DataSource ID="Scheduler" TypeID="System!System.SimpleScheduler">
                <IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
                <SyncTime>$Config/SyncTime$</SyncTime>
              </DataSource>
              <ProbeAction ID="SQLProbe" TypeID="System!System.OleDbProbe">
                <ConnectionString>$Config/ConnectionString$</ConnectionString>
                <Query>$Config/Query$</Query>
                <GetValue>true</GetValue>
                <OneRowPerItem>true</OneRowPerItem>
                <GetFetchTime>false</GetFetchTime>
              </ProbeAction>
            </MemberModules>
            <Composition>
              <Node ID="SQLProbe">
                <Node ID="Scheduler" />
              </Node>
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.OleDbData</OutputType>
      </DataSourceModuleType>
      <DataSourceModuleType ID="SSIS.Packages.DataSource.ExecutionTime.Filter" Accessibility="Internal" Batching="false">
        <Configuration>
          <xsd:element minOccurs="1" name="ConnectionString" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="SyncTime" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="IntervalSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="PackageID" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
        </Configuration>
        <OverrideableParameters>
          <OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int" />
          <OverrideableParameter ID="ConnectionString" Selector="$Config/ConnectionString$" ParameterType="string" />
        </OverrideableParameters>
        <ModuleImplementation Isolation="Any">
          <Composite>
            <MemberModules>
              <DataSource ID="Script" TypeID="SSIS.Packages.DataSource.ExecutionTime">
                <IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
                <SyncTime>$Config/SyncTime$</SyncTime>
                <ConnectionString>$Config/ConnectionString$</ConnectionString>
              </DataSource>
              <ConditionDetection ID="FilterFilePath" TypeID="System!System.ExpressionFilter">
                <Expression>
                  <SimpleExpression>
                    <ValueExpression>
                      <XPathQuery Type="String">Property[@Name='PackageID']</XPathQuery>
                    </ValueExpression>
                    <Operator>Equal</Operator>
                    <ValueExpression>
                      <Value Type="String">$Config/PackageID$</Value>
                    </ValueExpression>
                  </SimpleExpression>
                </Expression>
              </ConditionDetection>
            </MemberModules>
            <Composition>
              <Node ID="FilterFilePath">
                <Node ID="Script" />
              </Node>
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.BaseData</OutputType>
      </DataSourceModuleType>
      <DataSourceModuleType ID="SSIS.Packages.DataSource.ExecutionTime" Accessibility="Internal" Batching="false">
        <Configuration>
          <xsd:element minOccurs="1" name="IntervalSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="SyncTime" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="ConnectionString" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
        </Configuration>
        <ModuleImplementation Isolation="Any">
          <Composite>
            <MemberModules>
              <DataSource ID="Schedule" TypeID="System!System.SimpleScheduler">
                <IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
                <SyncTime>$Config/SyncTime$</SyncTime>
              </DataSource>
              <ProbeAction ID="Probe" TypeID="SSIS.Packages.Probe.GetExecutionTime">
                <ConnectionString>$Config/ConnectionString$</ConnectionString>
              </ProbeAction>
            </MemberModules>
            <Composition>
              <Node ID="Probe">
                <Node ID="Schedule" />
              </Node>
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.PropertyBagData</OutputType>
      </DataSourceModuleType>
      <DataSourceModuleType ID="SSIS.Packages.LongExecuting.CookDown.Filter" Accessibility="Internal" Batching="false">
        <Configuration>
          <xsd:element minOccurs="1" name="ConnectionString" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="IntervalSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="ID" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="ThresholdSec" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
        </Configuration>
        <OverrideableParameters>
          <OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int" />
          <OverrideableParameter ID="ConnectionString" Selector="$Config/ConnectionString$" ParameterType="string" />
          <OverrideableParameter ID="ThresholdSec" Selector="$Config/ThresholdSec$" ParameterType="int" />
        </OverrideableParameters>
        <ModuleImplementation Isolation="Any">
          <Composite>
            <MemberModules>
              <DataSource ID="Script" TypeID="SSIS.Packages.LongExecuting.CookDown.DataSources">
                <ConnectionString>$Config/ConnectionString$</ConnectionString>
                <IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
              </DataSource>
              <ConditionDetection ID="FilterFilePath" TypeID="System!System.ExpressionFilter">
                <Expression>
                  <And>
                    <Expression>
                      <SimpleExpression>
                        <ValueExpression>
                          <XPathQuery Type="String">Property[@Name='PackageID']</XPathQuery>
                        </ValueExpression>
                        <Operator>Equal</Operator>
                        <ValueExpression>
                          <Value Type="String">$Config/ID$</Value>
                        </ValueExpression>
                      </SimpleExpression>
                    </Expression>
                    <Expression>
                      <SimpleExpression>
                        <ValueExpression>
                          <XPathQuery Type="Integer">Property[@Name='Duration']</XPathQuery>
                        </ValueExpression>
                        <Operator>Greater</Operator>
                        <ValueExpression>
                          <Value Type="Integer">$Config/ThresholdSec$</Value>
                        </ValueExpression>
                      </SimpleExpression>
                    </Expression>
                  </And>
                </Expression>
              </ConditionDetection>
            </MemberModules>
            <Composition>
              <Node ID="FilterFilePath">
                <Node ID="Script" />
              </Node>
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.BaseData</OutputType>
      </DataSourceModuleType>
      <DataSourceModuleType ID="SSIS.Packages.LongExecuting.CookDown.DataSources" Accessibility="Public" Batching="false">
        <Configuration>
          <xsd:element minOccurs="1" name="ConnectionString" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="IntervalSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
        </Configuration>
        <OverrideableParameters>
          <OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int" />
          <OverrideableParameter ID="ConnectionString" Selector="$Config/ConnectionString$" ParameterType="string" />
        </OverrideableParameters>
        <ModuleImplementation Isolation="Any">
          <Composite>
            <MemberModules>
              <DataSource ID="Schedule" TypeID="System!System.SimpleScheduler">
                <IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
                <SyncTime />
              </DataSource>
              <ProbeAction ID="Probe" TypeID="SSIS.Packages.LongExecuting.Probe.Action">
                <ConnectionString>$Config/ConnectionString$</ConnectionString>
              </ProbeAction>
            </MemberModules>
            <Composition>
              <Node ID="Probe">
                <Node ID="Schedule" />
              </Node>
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.PropertyBagData</OutputType>
      </DataSourceModuleType>
      <ProbeActionModuleType ID="SSIS.Packages.Probe.GetExecutionTime" Accessibility="Internal" Batching="false" PassThrough="false">
        <Configuration>
          <xsd:element minOccurs="1" name="ConnectionString" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
        </Configuration>
        <ModuleImplementation Isolation="Any">
          <Composite>
            <MemberModules>
              <ProbeAction ID="Probe" TypeID="MicrosoftWindowsLibrary7585010!Microsoft.Windows.PowerShellPropertyBagTriggerOnlyProbe">
                <ScriptName>GetPackageExecutionTime.ps1</ScriptName>
                <ScriptBody>
    

		#----------------------------------- 
#Alarms capture via AuditDB 
#Name:        AuditDBAlarmCatcher.PS1 
#Param 0:    SQL Database Instance Name 
#Param 2:    Database name 
#Param 2:    The inteval in seconds 
#Author:    Tao Yang 
#Date:        07/12/2011 
#-----------------------------------  
param([string]$ConnectionString) 
$EVENT_TYPE_ERROR = 1
$EVENT_TYPE_WARNING = 2 
$EVENT_TYPE_INFORMATION = 4  

$ADOCon = New-Object -ComObject "ADODB.Connection" 
$oResults = New-Object -ComObject "ADODB.Recordset" 
$adOpenStatic = 3 
$adLockOptimistic = 3 
$ADOCon.Provider = "sqloledb" 
$ADOCon.ConnectionTimeout = 60 
$conString = $ConnectionString
$strQuery = "select e.identifier,e.duration,e.package_name
FROM
(select concat(cp.package_guid,ce.project_lsn) as identifier
	  ,ce.package_name
	  ,datediff(millisecond,ce.start_time,ce.end_time) as duration
	  ,ce.start_time
	  ,ce.end_time
	  ,row_number() OVER (PARTITION BY ce.package_name
                                   ORDER BY start_time DESC
                                  ) AS rn
	   from catalog.executions as ce WITH (NOLOCK)
	   Inner join catalog.packages as cp with (nolock)
	   on ce.package_name=cp.name 
) as e
where rn=1"
$ADOCon.Open($conString) 
$oResults.Open($strQuery, $ADOCon, $adOpenStatic, $adLockOptimistic) 

If (!$oResults.EOF) 
{ 
		If (!([appdomain]::currentdomain.getassemblies() | Where-Object {$_.FullName -ieq "system.core"})) { 
		Try { 
		Write-Host "Loading .NET DLL into Powershell..." -ForegroundColor Green [Void][System.Reflection.Assembly]::LoadWithPartialName("System.Core") 
		} 
		Catch 
		{ 
		#We cannot use Write-Error cmdlet here because $ErrorActionPreference is set to "SilentlyContinue" so it won't display on the screen. 
		Write-Host "Unable to load .NET Framework into Powershell, please make sure it is installed!" -foregroundColor Red 
		Exit } 
		} 

		$oResults.MoveFirst()
		Do {
			$oAPI = New-Object -ComObject "MOM.ScriptAPI" 
			$oBag = $oAPI.CreatePropertyBag() 
			$Name=$oResults.Fields.Item("package_name").Value
			$PackageID=$oResults.Fields.Item("identifier").Value
			$oBag.AddValue('PackageID', $PackageID) 
			$oBag.AddValue('PackageName', $Name) 
			[double]$Duration = $oResults.Fields.Item("Duration").Value
			$oBag.AddValue('Duration', $Duration) 
		$oResults.MoveNext()
				$oBag
			} until ($oResults.EOF)
}
			$oResults.Close()

$ADOCon.Close()   

  </ScriptBody>
                <Parameters>
                  <Parameter>
                    <Name>ConnectionString</Name>
                    <Value>$Config/ConnectionString$</Value>
                  </Parameter>
                </Parameters>
                <TimeoutSeconds>300</TimeoutSeconds>
              </ProbeAction>
            </MemberModules>
            <Composition>
              <Node ID="Probe" />
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.PropertyBagData</OutputType>
        <TriggerOnly>true</TriggerOnly>
      </ProbeActionModuleType>
      <ProbeActionModuleType ID="SSIS.Packages.LongExecuting.Probe.Action" Accessibility="Public" Batching="false" PassThrough="false">
        <Configuration>
          <xsd:element minOccurs="1" name="ConnectionString" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
        </Configuration>
        <ModuleImplementation Isolation="Any">
          <Composite>
            <MemberModules>
              <ProbeAction ID="PSScript" TypeID="MicrosoftWindowsLibrary7585010!Microsoft.Windows.PowerShellPropertyBagTriggerOnlyProbe">
                <ScriptName>SSIS.Packages.LongExecuting.ps1</ScriptName>
                <ScriptBody>

		#----------------------------------- 
#Alarms capture via AuditDB 
#Name:        AuditDBAlarmCatcher.PS1 
#Param 0:    SQL Database Instance Name 
#Param 2:    Database name 
#Param 2:    The inteval in seconds 
#Author:    Tao Yang 
#Date:        07/12/2011 
#-----------------------------------  
param([string]$ConnectionString) 
$EVENT_TYPE_ERROR = 1
$EVENT_TYPE_WARNING = 2 
$EVENT_TYPE_INFORMATION = 4  

$ADOCon = New-Object -ComObject "ADODB.Connection" 
$oResults = New-Object -ComObject "ADODB.Recordset" 
$adOpenStatic = 3 
$adLockOptimistic = 3 
$ADOCon.Provider = "sqloledb" 
$ADOCon.ConnectionTimeout = 60 
$conString = $ConnectionString
$strQuery = "select e.identifier,e.duration,e.package_name, e.status,e.starttime,e.endtime
FROM
(select concat(cp.package_guid,ce.project_lsn) as identifier
,CASE ce.status
	When '1' then 'Created'
	When '2' then 'Running'
	When '3' then 'Canceled'
	When '4' then 'Failed'
	When '5' then 'Pending'
	When '6' then 'Ended Unexpectedly'
	When '7' then 'Succeeded'
	When '8' then 'Stopping'
	When '9' then 'Completed'
	End
	as status
	  ,ce.package_name
	  ,CASE
		When ce.end_time is null
		then datediff(second,Convert(datetime, 
			SWITCHOFFSET(Convert(datetimeoffset,ce.start_time),
					DATENAME(TzOffset,SYSDATETIMEOFFSET()))),
					CURRENT_TIMESTAMP) 
		else datediff(second,ce.start_time,ce.end_time)
		end
		as duration
	  ,Convert(datetime, 
		SWITCHOFFSET(Convert(datetimeoffset,ce.start_time),
					DATENAME(TzOffset,SYSDATETIMEOFFSET()))) as starttime
	  ,Convert(datetime, 
		SWITCHOFFSET(Convert(datetimeoffset,ce.end_time),
					DATENAME(TzOffset,SYSDATETIMEOFFSET()))) as endtime
	  ,row_number() OVER (PARTITION BY ce.package_name
                                   ORDER BY start_time DESC
                                  ) AS rn
	   from catalog.executions as ce WITH (NOLOCK)
	   Inner join catalog.packages as cp with (nolock)
	   on ce.package_name=cp.name 
) as e
where rn=1"
$ADOCon.Open($conString) 
$oResults.Open($strQuery, $ADOCon, $adOpenStatic, $adLockOptimistic) 

If (!$oResults.EOF) 
{ 
		If (!([appdomain]::currentdomain.getassemblies() | Where-Object {$_.FullName -ieq "system.core"})) { 
		Try { 
		Write-Host "Loading .NET DLL into Powershell..." -ForegroundColor Green [Void][System.Reflection.Assembly]::LoadWithPartialName("System.Core") 
		} 
		Catch 
		{ 
		#We cannot use Write-Error cmdlet here because $ErrorActionPreference is set to "SilentlyContinue" so it won't display on the screen. 
		Write-Host "Unable to load .NET Framework into Powershell, please make sure it is installed!" -foregroundColor Red 
		Exit } 
		} 
		
		$oResults.MoveFirst()
		Do {
		
		$oAPI = New-Object -ComObject "MOM.ScriptAPI" 
		$oBag = $oAPI.CreatePropertyBag() 

		$EventDate = $oResults.Fields.Item("Starttime").Value  
		$Package = $oResults.Fields.Item("package_name").Value  
		$Status= $oResults.Fields.Item("status").Value 
		[int]$ExecutionTime = $oResults.Fields.Item("duration").Value 
		$PackageID= $oResults.Fields.Item("identifier").Value  

		$LogDetail = "$EventDate`: The SSIS Package $Package has a executing time of $ExecutionTime sec exceeding the threshold. The execution status is $Status." 
		$oBag.AddValue('Duration', $ExecutionTime) 
		$oBag.AddValue('PackageID', $PackageID) 
		$oBag.AddValue('LogEntry', $LogDetail) 
		$oResults.MoveNext()
		$oBag
		} until ($oResults.EOF)
		$oResults.Close()

		} 

$ADOCon.Close()   
</ScriptBody>
                <Parameters>
                  <Parameter>
                    <Name>ConnectionString</Name>
                    <Value>$Config/ConnectionString$</Value>
                  </Parameter>
                </Parameters>
                <TimeoutSeconds>600</TimeoutSeconds>
              </ProbeAction>
            </MemberModules>
            <Composition>
              <Node ID="PSScript" />
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.PropertyBagData</OutputType>
        <TriggerOnly>true</TriggerOnly>
      </ProbeActionModuleType>
    </ModuleTypes>
    <MonitorTypes>
      <UnitMonitorType ID="SSIS.Database.DBProbeMonitorType" Accessibility="Internal">
        <MonitorTypeStates>
          <MonitorTypeState ID="State1" NoDetection="false" />
          <MonitorTypeState ID="State2" NoDetection="false" />
          <MonitorTypeState ID="State3" NoDetection="false" />
        </MonitorTypeStates>
        <Configuration>
          <IncludeSchemaTypes>
            <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
          </IncludeSchemaTypes>
          <xsd:element minOccurs="1" name="IntervalSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="SyncTime" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="ConnectionString" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="Query" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="State1Filter" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="State2Filter" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="1" name="State3Filter" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
        </Configuration>
        <MonitorImplementation>
          <MemberModules>
            <DataSource ID="DBProbe" TypeID="SSIS.Database.TimedMonitorProbe">
              <IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
              <SyncTime>$Config/SyncTime$</SyncTime>
              <ConnectionString>$Config/ConnectionString$</ConnectionString>
              <Query>$Config/Query$</Query>
              <OneRowPerItem>true</OneRowPerItem>
            </DataSource>
            <ConditionDetection ID="State1Filter" TypeID="System!System.ExpressionFilter">
              <Expression>$Config/State1Filter$</Expression>
            </ConditionDetection>
            <ConditionDetection ID="State2Filter" TypeID="System!System.ExpressionFilter">
              <Expression>$Config/State2Filter$</Expression>
            </ConditionDetection>
            <ConditionDetection ID="State3Filter" TypeID="System!System.ExpressionFilter">
              <Expression>$Config/State3Filter$</Expression>
            </ConditionDetection>
          </MemberModules>
          <RegularDetections>
            <RegularDetection MonitorTypeStateID="State1">
              <Node ID="State1Filter">
                <Node ID="DBProbe" />
              </Node>
            </RegularDetection>
            <RegularDetection MonitorTypeStateID="State2">
              <Node ID="State2Filter">
                <Node ID="DBProbe" />
              </Node>
            </RegularDetection>
            <RegularDetection MonitorTypeStateID="State3">
              <Node ID="State3Filter">
                <Node ID="DBProbe" />
              </Node>
            </RegularDetection>
          </RegularDetections>
        </MonitorImplementation>
      </UnitMonitorType>
    </MonitorTypes>
  </TypeDefinitions>
  <Monitoring>
    <Discoveries>
      <Discovery ID="SSIS.Packages.Discovery" Enabled="true" Target="SQLServer2012Discovery6410!Microsoft.SQLServer.2012.DBEngine" ConfirmDelivery="false" Remotable="true" Priority="Normal">
        <Category>Discovery</Category>
        <DiscoveryTypes>
          <DiscoveryClass TypeID="SSIS.Packages">
            <Property TypeID="SSIS.Packages" PropertyID="ID" />
            <Property TypeID="SSIS.Packages" PropertyID="SSISServer" />
            <Property TypeID="SSIS.Packages" PropertyID="SQLInstance" />
            <Property TypeID="SSIS.Packages" PropertyID="Name" />
            <Property TypeID="SSIS.Packages" PropertyID="Version" />
            <Property TypeID="SSIS.Packages" PropertyID="Project" />
            <Property TypeID="SSIS.Packages" PropertyID="PackageGUID" />
            <Property TypeID="SSIS.Packages" PropertyID="ProjectLSN" />
            <Property TypeID="System!System.Entity" PropertyID="DisplayName" />
          </DiscoveryClass>
        </DiscoveryTypes>
        <DataSource ID="SQLQueryPackages" TypeID="SSIS.Discovery.TimedDiscoveryProbe">
          <IntervalSeconds>14400</IntervalSeconds>
          <SyncTime />
          <ConnectionString>Provider=SQLOLEDB;Server=$Target/Property[Type="MicrosoftSQLServerLibrary6410!Microsoft.SQLServer.DBEngine"]/ConnectionString$;Database=master;Integrated Security=SSPI</ConnectionString>
          <Query>IF EXISTS (SELECT * FROM [master].[sys].[databases] Where name='SSISDB' ) 
		  SELECT CONCAT(pa.[package_guid],pr.object_version_lsn) As Identifier,
		  @@ServiceName,
		  pr.object_version_lsn,
		  pa.[package_guid]
      ,pa.[name]
      ,pa.[version_comments]
	  ,pr.name
  FROM [SSISDB].[catalog].[packages] as pa
  inner join [SSISDB].[catalog].[projects] as pr
  on pa.project_id=pr.project_id
  order by pa.name</Query>
          <QueryTimeout>600</QueryTimeout>
          <ClassId>$MPElement[Name="SSIS.Packages"]$</ClassId>
          <InstanceSettings>
            <Settings>
              <Setting>
                <Name>$MPElement[Name="MicrosoftWindowsLibrary7585010!Microsoft.Windows.Computer"]/PrincipalName$</Name>
                <Value>$Target/Host/Property[Type="MicrosoftWindowsLibrary7585010!Microsoft.Windows.Computer"]/PrincipalName$</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="MicrosoftSQLServerLibrary6410!Microsoft.SQLServer.ServerRole"]/InstanceName$</Name>
                <Value>$Data/Columns[1]/Column[2]$</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="SSIS.Packages"]/ID$</Name>
                <Value>$Data/Columns[1]/Column[1]$</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="System!System.Entity"]/DisplayName$</Name>
                <Value>$Data/Columns[1]/Column[5]$</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="SSIS.Packages"]/SSISServer$</Name>
                <Value>$Target/Host/Property[Type="MicrosoftWindowsLibrary7585010!Microsoft.Windows.Computer"]/NetworkName$</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="SSIS.Packages"]/SQLInstance$</Name>
                <Value>$Target/Property[Type="MicrosoftSQLServerLibrary6410!Microsoft.SQLServer.DBEngine"]/ConnectionString$</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="SSIS.Packages"]/Version$</Name>
                <Value>$Data/Columns[1]/Column[6]$</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="SSIS.Packages"]/Project$</Name>
                <Value>$Data/Columns[1]/Column[7]$</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="SSIS.Packages"]/ProjectLSN$</Name>
                <Value>$Data/Columns[1]/Column[3]$</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="SSIS.Packages"]/PackageGUID$</Name>
                <Value>$Data/Columns[1]/Column[4]$</Value>
              </Setting>
            </Settings>
          </InstanceSettings>
          <Expression>
            <Exists>
              <ValueExpression>
                <XPathQuery Type="String">Columns/Column[1]</XPathQuery>
              </ValueExpression>
            </Exists>
          </Expression>
        </DataSource>
      </Discovery>
    </Discoveries>
    <Rules>
      <Rule ID="SSIS.Packages.CollectExecutionData" Enabled="true" Target="SSIS.Packages" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
        <Category>PerformanceCollection</Category>
        <DataSources>
          <DataSource ID="DS" TypeID="SSIS.Packages.DataSource.ExecutionTime.Filter">
            <ConnectionString>Provider=SQLOLEDB;Server=$Target/Host/Property[Type="MicrosoftSQLServerLibrary6410!Microsoft.SQLServer.DBEngine"]/ConnectionString$;Database=SSISDB;Integrated Security=SSPI</ConnectionString>
            <SyncTime />
            <IntervalSeconds>1800</IntervalSeconds>
            <PackageID>$Target/Property[Type="SSIS.Packages"]/ID$</PackageID>
          </DataSource>
        </DataSources>
        <ConditionDetection ID="MapToPerf" TypeID="Performance!System.Performance.DataGenericMapper">
          <ObjectName>$Target/Property[Type="SSIS.Packages"]/Project$</ObjectName>
          <CounterName>ExecutionTime (ms)</CounterName>
          <InstanceName>$Target/Property[Type="SSIS.Packages"]/Name$</InstanceName>
          <Value>$Data/Property[@Name='Duration']$</Value>
        </ConditionDetection>
        <WriteActions>
          <WriteAction ID="WriteToDB" TypeID="SystemCenter!Microsoft.SystemCenter.CollectPerformanceData" />
          <WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData" />
        </WriteActions>
      </Rule>
      <Rule ID="SSIS.Packages.LongExecuting.Catcher.Rule" Enabled="true" Target="SSIS.Packages" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
        <Category>Custom</Category>
        <DataSources>
          <DataSource ID="DataSource" TypeID="SSIS.Packages.LongExecuting.CookDown.Filter">
            <ConnectionString>Provider=SQLOLEDB;Server=$Target/Host/Property[Type="MicrosoftSQLServerLibrary6410!Microsoft.SQLServer.DBEngine"]/ConnectionString$;Database=SSISDB;Integrated Security=SSPI</ConnectionString>
            <IntervalSeconds>300</IntervalSeconds>
            <ID>$Target/Property[Type="SSIS.Packages"]/ID$</ID>
            <ThresholdSec>30</ThresholdSec>
          </DataSource>
        </DataSources>
        <WriteActions>
          <WriteAction ID="Alert" TypeID="Health!System.Health.GenerateAlert">
            <Priority>2</Priority>
            <Severity>2</Severity>
            <AlertMessageId>$MPElement[Name="AlertMessageIDLongExecutingPackage"]$</AlertMessageId>
            <AlertParameters>
              <AlertParameter1>$Target/Property[Type="System!System.Entity"]/DisplayName$</AlertParameter1>
              <AlertParameter2>$Data/Property[@Name='LogEntry']$</AlertParameter2>
            </AlertParameters>
            <Suppression>
              <SuppressionValue>$Target/Property[Type="System!System.Entity"]/DisplayName$</SuppressionValue>
            </Suppression>
          </WriteAction>
        </WriteActions>
      </Rule>
    </Rules>
    <Monitors>
      <UnitMonitor ID="SSIS.Package.Monitor" Accessibility="Public" Enabled="true" Target="SSIS.Packages" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="SSIS.Database.DBProbeMonitorType" ConfirmDelivery="true">
        <Category>Custom</Category>
        <AlertSettings AlertMessage="SSIS.Packages.DBState.Rule.AlertMessage">
          <AlertOnState>Error</AlertOnState>
          <AutoResolve>true</AutoResolve>
          <AlertPriority>Normal</AlertPriority>
          <AlertSeverity>Error</AlertSeverity>
        </AlertSettings>
        <OperationalStates>
          <OperationalState ID="UIGeneratedOpStateId0410a7517d8245ec9fa33fb17242a5c3" MonitorTypeStateID="State1" HealthState="Success" />
          <OperationalState ID="UIGeneratedOpStateIdd9ad1639fcd0434093bb7b22293f7439" MonitorTypeStateID="State2" HealthState="Warning" />
          <OperationalState ID="UIGeneratedOpStateId025f236632e940f7bc289b6b2ab8429g" MonitorTypeStateID="State3" HealthState="Error" />
        </OperationalStates>
        <Configuration>
          <IntervalSeconds>120</IntervalSeconds>
          <SyncTime />
          <ConnectionString>Provider=SQLOLEDB;Server=$Target/Host/Property[Type="MicrosoftSQLServerLibrary6410!Microsoft.SQLServer.DBEngine"]/ConnectionString$;Database=SSISDB;Integrated Security=SSPI</ConnectionString>
          <Query>select e.identifier,e.status
FROM
(select concat(cp.package_guid,ce.project_lsn) as identifier
	  ,ce.status
	  ,ce.start_time
	  ,row_number() OVER (PARTITION BY ce.package_name
                                   ORDER BY start_time DESC
                                  ) AS rn
	   from catalog.executions as ce WITH (NOLOCK)
	   Inner join catalog.packages as cp with (nolock)
	   on ce.package_name=cp.name 
) as e
where rn=1</Query>
          <State1Filter>
            <And>
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <XPathQuery Type="String">Columns/Column[1]</XPathQuery>
                  </ValueExpression>
                  <Operator>Equal</Operator>
                  <ValueExpression>
                    <Value Type="String">$Target/Property[Type="SSIS.Packages"]/ID$</Value>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
              <Expression>
                <Or>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="UnsignedInteger">Columns/Column[2]</XPathQuery>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value Type="UnsignedInteger">1</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="UnsignedInteger">Columns/Column[2]</XPathQuery>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value Type="UnsignedInteger">2</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="UnsignedInteger">Columns/Column[2]</XPathQuery>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value Type="UnsignedInteger">7</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="UnsignedInteger">Columns/Column[2]</XPathQuery>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value Type="UnsignedInteger">8</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="UnsignedInteger">Columns/Column[2]</XPathQuery>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value Type="UnsignedInteger">9</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                </Or>
              </Expression>
            </And>
          </State1Filter>
          <State2Filter>
            <And>
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <XPathQuery Type="String">Columns/Column[1]</XPathQuery>
                  </ValueExpression>
                  <Operator>Equal</Operator>
                  <ValueExpression>
                    <Value Type="String">$Target/Property[Type="SSIS.Packages"]/ID$</Value>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
              <Expression>
                <Or>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="UnsignedInteger">Columns/Column[2]</XPathQuery>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value Type="UnsignedInteger">3</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="UnsignedInteger">Columns/Column[2]</XPathQuery>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value Type="UnsignedInteger">5</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                </Or>
              </Expression>
            </And>
          </State2Filter>
          <State3Filter>
            <And>
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <XPathQuery Type="String">Columns/Column[1]</XPathQuery>
                  </ValueExpression>
                  <Operator>Equal</Operator>
                  <ValueExpression>
                    <Value Type="String">$Target/Property[Type="SSIS.Packages"]/ID$</Value>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
              <Expression>
                <Or>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="UnsignedInteger">Columns/Column[2]</XPathQuery>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value Type="UnsignedInteger">4</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="UnsignedInteger">Columns/Column[2]</XPathQuery>
                      </ValueExpression>
                      <Operator>Equal</Operator>
                      <ValueExpression>
                        <Value Type="UnsignedInteger">6</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                </Or>
              </Expression>
            </And>
          </State3Filter>
        </Configuration>
      </UnitMonitor>
    </Monitors>
  </Monitoring>
  <Presentation>
    <Views>
      <View ID="SSIS.Packages.StateView" Accessibility="Internal" Enabled="true" Target="SSIS.Packages" TypeID="SystemCenter!Microsoft.SystemCenter.StateViewType" Visible="true">
        <Category>Operations</Category>
        <Criteria />
      </View>
      <View ID="View_314e5d4f00234281bfe0562774621980" Accessibility="Public" Enabled="true" Target="SSIS.Packages" TypeID="SystemCenter!Microsoft.SystemCenter.PerformanceViewType" Visible="true">
        <Category>Operations</Category>
        <Criteria />
        <Presentation>
          <SortedColumnIndex>0</SortedColumnIndex>
          <SortOrder>0</SortOrder>
          <StartTime>2014-08-04T16:36:48.6414574+02:00</StartTime>
          <EndTime>2014-08-05T16:36:48.6414574+02:00</EndTime>
          <DynamicTimeTicks>864000000000</DynamicTimeTicks>
          <IsDynamic>true</IsDynamic>
          <Is3DMode>false</Is3DMode>
          <ShowAlerts>false</ShowAlerts>
          <ShowMaintenanceMode>false</ShowMaintenanceMode>
          <BaselineMode>false</BaselineMode>
          <ShowPointLabels>false</ShowPointLabels>
          <EnableSmartLabels>true</EnableSmartLabels>
          <RightAngleAxes>false</RightAngleAxes>
          <ClusterSeries>false</ClusterSeries>
          <Title />
          <TitleFont>Microsoft Sans Serif,12,Regular</TitleFont>
          <ChartFont>Microsoft Sans Serif,8.25,Regular</ChartFont>
          <ShowBands>false</ShowBands>
          <BandColor>-1579033</BandColor>
          <ChartType>Line</ChartType>
          <Depth>100</Depth>
          <GapDepth>100</GapDepth>
          <Perspective>10</Perspective>
          <GraphXRotation>0</GraphXRotation>
          <GraphYRotation>0</GraphYRotation>
          <XLabelAngle>0</XLabelAngle>
          <LabelColor>-16777216</LabelColor>
          <LabelFont>Microsoft Sans Serif,8.25,Regular</LabelFont>
          <XAxisVisible>True</XAxisVisible>
          <XShowMajorGridlines>false</XShowMajorGridlines>
          <XShowMinorGridlines>false</XShowMinorGridlines>
          <ShowInterlaceStrips>false</ShowInterlaceStrips>
          <XInterlaceColor>16777215</XInterlaceColor>
          <XShowSideMargin>true</XShowSideMargin>
          <XAxisFont>Microsoft Sans Serif,8.25,Regular</XAxisFont>
          <AutoAxis>true</AutoAxis>
          <AxisMax>100</AxisMax>
          <AxisMin>0</AxisMin>
          <YAxisVisible>True</YAxisVisible>
          <YShowMajorGridlines>true</YShowMajorGridlines>
          <YShowMinorGridlines>false</YShowMinorGridlines>
          <YShowInterlaceStrips>false</YShowInterlaceStrips>
          <YShowSideMargin>true</YShowSideMargin>
          <YAxisFont>Microsoft Sans Serif,8.25,Regular</YAxisFont>
          <BackgroundColor1>-1</BackgroundColor1>
          <BackgroundColor2>-1</BackgroundColor2>
          <GradientType>None</GradientType>
          <Series />
        </Presentation>
        <Target />
      </View>
      <View ID="View_421c28551d5a4bff9071699dc842c2c2" Accessibility="Public" Enabled="true" Target="SSIS.Packages" TypeID="SystemCenter!Microsoft.SystemCenter.AlertViewType" Visible="true">
        <Category>Operations</Category>
        <Criteria>
          <ResolutionState>
            <StateRange Operator="NotEquals">255</StateRange>
          </ResolutionState>
        </Criteria>
        <Presentation>
          <ColumnInfo Index="0" SortIndex="0" Width="22" Grouped="true" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Severity</Name>
            <Id>Severity</Id>
          </ColumnInfo>
          <ColumnInfo Index="1" SortIndex="-1" Width="54" Grouped="false" Sorted="false" IsSortable="false" Visible="true" SortOrder="Ascending">
            <Name>Icon</Name>
            <Id>Icon</Id>
          </ColumnInfo>
          <ColumnInfo Index="2" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Path</Name>
            <Id>MonitoringObjectPath</Id>
          </ColumnInfo>
          <ColumnInfo Index="3" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Source</Name>
            <Id>MonitoringObjectDisplayName</Id>
          </ColumnInfo>
          <ColumnInfo Index="4" SortIndex="-1" Width="22" Grouped="false" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Maintenance Mode</Name>
            <Id>MonitoringObjectInMaintenanceMode</Id>
          </ColumnInfo>
          <ColumnInfo Index="5" SortIndex="-1" Width="250" Grouped="false" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Name</Name>
            <Id>Name</Id>
          </ColumnInfo>
          <ColumnInfo Index="6" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Resolution State</Name>
            <Id>ResolutionState</Id>
          </ColumnInfo>
          <ColumnInfo Index="7" SortIndex="-1" Width="150" Grouped="false" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Created</Name>
            <Id>TimeRaised</Id>
          </ColumnInfo>
          <ColumnInfo Index="8" SortIndex="1" Width="100" Grouped="false" Sorted="true" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Age</Name>
            <Id>Age</Id>
          </ColumnInfo>
          <ColumnInfo Index="9" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Type</Name>
            <Id>Category</Id>
          </ColumnInfo>
          <ColumnInfo Index="10" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Owner</Name>
            <Id>Owner</Id>
          </ColumnInfo>
          <ColumnInfo Index="11" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Priority</Name>
            <Id>Priority</Id>
          </ColumnInfo>
          <ColumnInfo Index="12" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Latency</Name>
            <Id>Latency</Id>
          </ColumnInfo>
          <ColumnInfo Index="13" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Description</Name>
            <Id>Description</Id>
          </ColumnInfo>
          <ColumnInfo Index="14" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Connector</Name>
            <Id>ConnectorId</Id>
          </ColumnInfo>
          <ColumnInfo Index="15" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Forwarding Status</Name>
            <Id>ConnectorStatus</Id>
          </ColumnInfo>
          <ColumnInfo Index="16" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Class</Name>
            <Id>Class</Id>
          </ColumnInfo>
          <ColumnInfo Index="17" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Time in State</Name>
            <Id>TimeInState</Id>
          </ColumnInfo>
          <ColumnInfo Index="18" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 1</Name>
            <Id>CustomField1</Id>
          </ColumnInfo>
          <ColumnInfo Index="19" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 2</Name>
            <Id>CustomField2</Id>
          </ColumnInfo>
          <ColumnInfo Index="20" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 3</Name>
            <Id>CustomField3</Id>
          </ColumnInfo>
          <ColumnInfo Index="21" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 4</Name>
            <Id>CustomField4</Id>
          </ColumnInfo>
          <ColumnInfo Index="22" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 5</Name>
            <Id>CustomField5</Id>
          </ColumnInfo>
          <ColumnInfo Index="23" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 6</Name>
            <Id>CustomField6</Id>
          </ColumnInfo>
          <ColumnInfo Index="24" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 7</Name>
            <Id>CustomField7</Id>
          </ColumnInfo>
          <ColumnInfo Index="25" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 8</Name>
            <Id>CustomField8</Id>
          </ColumnInfo>
          <ColumnInfo Index="26" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 9</Name>
            <Id>CustomField9</Id>
          </ColumnInfo>
          <ColumnInfo Index="27" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 10</Name>
            <Id>CustomField10</Id>
          </ColumnInfo>
          <ColumnInfo Index="28" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Resolved By</Name>
            <Id>ResolvedBy</Id>
          </ColumnInfo>
          <ColumnInfo Index="29" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Time Resolved</Name>
            <Id>TimeResolved</Id>
          </ColumnInfo>
          <ColumnInfo Index="30" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Last State Change</Name>
            <Id>TimeResolutionStateLastModified</Id>
          </ColumnInfo>
          <ColumnInfo Index="31" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Last Modified</Name>
            <Id>LastModified</Id>
          </ColumnInfo>
          <ColumnInfo Index="32" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Last Modified By</Name>
            <Id>LastModifiedBy</Id>
          </ColumnInfo>
          <ColumnInfo Index="33" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Management Group</Name>
            <Id>ManagementGroup</Id>
          </ColumnInfo>
          <ColumnInfo Index="34" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Site</Name>
            <Id>SiteName</Id>
          </ColumnInfo>
          <ColumnInfo Index="35" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Repeat Count</Name>
            <Id>RepeatCount</Id>
          </ColumnInfo>
          <ColumnInfo Index="36" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Ticket ID</Name>
            <Id>TicketId</Id>
          </ColumnInfo>
          <ColumnInfo Index="37" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>TFS Work Item ID</Name>
            <Id>TfsWorkItemId</Id>
          </ColumnInfo>
          <ColumnInfo Index="38" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>TFS Work Item Owner</Name>
            <Id>TfsWorkItemOwner</Id>
          </ColumnInfo>
        </Presentation>
        <Target />
      </View>
    </Views>
    <Folders>
      <Folder ID="SSIS.ViewFolder.Root" Accessibility="Internal" ParentFolder="SystemCenter!Microsoft.SystemCenter.Monitoring.ViewFolder.Root" />
    </Folders>
    <FolderItems>
      <FolderItem ElementID="SSIS.Packages.StateView" ID="i814a31cba15e4ddc94be7decea066f100" Folder="SSIS.ViewFolder.Root" />
      <FolderItem ElementID="View_314e5d4f00234281bfe0562774621980" ID="i2e391c7cd4824fc3ab12ae94d4ee7305" Folder="SSIS.ViewFolder.Root" />
      <FolderItem ElementID="View_421c28551d5a4bff9071699dc842c2c2" ID="i0ac930ec7e90489cb7009b39301b0226" Folder="SSIS.ViewFolder.Root" />
    </FolderItems>
    <StringResources>
      <StringResource ID="SSIS.Packages.DBState.Rule.AlertMessage" />
      <StringResource ID="AlertMessageIDLongExecutingPackage" />
    </StringResources>
  </Presentation>
  <LanguagePacks>
    <LanguagePack ID="ENU" IsDefault="false">
      <DisplayStrings>
        <DisplayString ElementID="SSIS.Discovery.TimedDiscoveryProbe">
          <Name>Timed Discovery Probe</Name>
          <Description>Timed Discovery Probe</Description>
        </DisplayString>
        <DisplayString ElementID="SSIS.AddIn">
          <Name>SSIS Add-In</Name>
          <Description>This MP displays the SSIS Packages</Description>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages">
          <Name>SSIS Packages</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages" SubElementID="ID">
          <Name>ID</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages" SubElementID="SSISServer">
          <Name>SSIS Server</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages" SubElementID="SQLInstance">
          <Name>SQL Instance</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages" SubElementID="Name">
          <Name>Name</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages" SubElementID="Version">
          <Name>Version</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages" SubElementID="Project">
          <Name>Project</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages" SubElementID="PackageGUID">
          <Name>Package GUID</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages" SubElementID="ProjectLSN">
          <Name>Project LSN</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.ViewFolder.Root">
          <Name>SSIS Packages</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.Discovery">
          <Name>Discover SSIS Packages</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.StateView">
          <Name>Packages</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.DBState.Rule.AlertMessage">
          <Name>SSIS Package Execution Failed</Name>
          <Description>SSIS Package Execution Status is Failed or Ended Unexpectedly</Description>
        </DisplayString>
        <DisplayString ElementID="SSIS.Package.Monitor" SubElementID="UIGeneratedOpStateId0410a7517d8245ec9fa33fb17242a5c3">
          <Name>SSIS Package Monitoring Success</Name>
          <Description>SSIS Package Monitoring Success</Description>
        </DisplayString>
        <DisplayString ElementID="SSIS.Package.Monitor" SubElementID="UIGeneratedOpStateIdd9ad1639fcd0434093bb7b22293f7439">
          <Name>SSIS Package Monitoring Warning</Name>
          <Description>SSIS Package Monitoring Warning</Description>
        </DisplayString>
        <DisplayString ElementID="SSIS.Package.Monitor" SubElementID="UIGeneratedOpStateId025f236632e940f7bc289b6b2ab8429g">
          <Name>SSIS Package Monitoring Error</Name>
          <Description>SSIS Package Monitoring Error</Description>
        </DisplayString>
        <DisplayString ElementID="SSIS.Database.DBProbeMonitorType">
          <Name>SSIS Package Monitor Type</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.CollectExecutionData">
          <Name>Collect SSIS Packages Execution Time</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.DataSource.ExecutionTime">
          <Name>SSIS Package Execution DS</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.Probe.GetExecutionTime">
          <Name>Get SSIS Packages Execution Probe Action</Name>
        </DisplayString>
        <DisplayString ElementID="View_314e5d4f00234281bfe0562774621980">
          <Name>Packages Execution</Name>
        </DisplayString>
        <DisplayString ElementID="AlertMessageIDLongExecutingPackage">
          <Name>Long Executing SSIS Package</Name>
          <Description>{0}
{1}
</Description>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.LongExecuting.Catcher.Rule">
          <Name>Long Executing SSIS Packages Catcher Rule</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.LongExecuting.Probe.Action">
          <Name>Long Executing SSIS Packages Probe Action</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.LongExecuting.CookDown.DataSources">
          <Name>Long Executing SSIS Packages Data Sources</Name>
          <Description>Long Executing SSIS Packages Data Sources according to the threshold configurable in seconds</Description>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.LongExecuting.CookDown.Filter">
          <Name>Long Executing SSIS Packages Filter</Name>
          <Description>Long Executing SSIS Packages Filter</Description>
        </DisplayString>
        <DisplayString ElementID="View_421c28551d5a4bff9071699dc842c2c2">
          <Name>SSIS Packages Alerts</Name>
        </DisplayString>
      </DisplayStrings>
    </LanguagePack>
    <LanguagePack ID="FRA" IsDefault="false">
      <DisplayStrings>
        <DisplayString ElementID="SSIS.Packages.CollectExecutionData" SubElementID="MapToPerf">
          <Name>MapToPerf</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.CollectExecutionData" SubElementID="WriteToDW">
          <Name>Performance data publisher</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.CollectExecutionData" SubElementID="WriteToDB">
          <Name>Performance Data Collection Write Action</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.CollectExecutionData" SubElementID="DS">
          <Name>DS</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.LongExecuting.Catcher.Rule" SubElementID="Alert">
          <Name>Alert</Name>
        </DisplayString>
        <DisplayString ElementID="SSIS.Packages.LongExecuting.Catcher.Rule" SubElementID="DataSource">
          <Name>Long Executing SSIS Packages Filter</Name>
        </DisplayString>
      </DisplayStrings>
    </LanguagePack>
  </LanguagePacks>
</ManagementPack>